class WashMachine{
    //属性、字段、成员变量：这些成员变量定义在方法外部，类的内部
    public String brand;//品牌
    public String type;//型号
    public double weight;//重量
    public double length;//长
    public double width;//宽
    public double height;//高
    public String corlor;//颜色

//成员方法(行为）
    public  void  washClothes(){//洗衣服
        System.out.println("洗衣功能");
    }
    public void dryClothes(){//tuoshui
        System.out.println("脱水功能");
    }
    public void setTime(){//定时
        System.out.println("定时功能");
    }
}
class Dog{
    public String name;
    public String color;
    public  int age;

    public void barks(){
        System.out.println(name + ":汪汪叫");
    }
    public  void wag(){
        System.out.println(name + ":摇尾巴");
    }
}


public class Test1 {
    public static void main(String[] args) {
        Dog dog = new Dog();//实例化对象
        Dog dog1 = new Dog();
        Dog dog2 = null;
        dog.name = "小黄";
        dog.age = 10;
        dog.color = "黄色";
        System.out.println("年龄："+dog.age);
        System.out.println("姓名："+dog.name);
        System.out.println("颜色："+dog.color);
        dog.barks();
        dog.wag();

        System.out.println();
        dog.name = "小黑";
        dog.age = 18;
        dog.color = "黑色";
        System.out.println("年龄："+dog.age);
        System.out.println("姓名："+dog.name);
        System.out.println("颜色："+dog.color);
        dog.barks();
        dog.wag();
    }
}
